<?php

namespace app\index\controller;
use think\Controller;
use think\Request;
use think\facade\Session;
use app\index\model\User1;
class Mining extends Controller
{
    /**
     * 显示资源列表
     *
     * @return \think\Response
     */
    public function index(Request $request)
    {
        Session::set('userid',1);
        $id= Session::get('userid');
        $data=User1::get($id);
      return $this->fetch('mining',['data'=>$data]);
    }
    public function increase(Request $request)
    {
        return $this->fetch('increase');
    }
    public function one(Request $request)
    {
       return json(['message'=>'该矿还没挖完呢，请到时间再来领取','type'=>'error','redirect'=>'']);
    }
}
